package com.qk.management.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.qk.common.PageResult;
import com.qk.domain.clue.ClueDO;
import com.qk.domain.operate.OperateDO;
import com.qk.dto.operate.OperateDTO;
import com.qk.entity.OperateLog;
import com.qk.management.mapper.OperateLogMapper;
import com.qk.management.service.OperateLogService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 *
 * @author MrZhao
 * @created 2025-10-17 17:05
 * @description
 *
 *  日志业务实现类
 *
 */
@Slf4j
@Service
@SuppressWarnings("all")
public class OperateLogServiceImpl extends ServiceImpl<OperateLogMapper, OperateLog> implements OperateLogService {
    @Override
    public PageResult<OperateDO> list(OperateDTO dto) {
        Page pages = new Page(dto.getPage(),dto.getPageSize());
        Page<OperateDO> operateDOPage = this.baseMapper.selectByPageMp(pages, dto);
        return PageResult.<OperateDO>builder()
                .total(Long.valueOf(operateDOPage.getTotal()).intValue())
                .rows(operateDOPage.getRecords())
                .build();
    }
}